<%@page pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Travel</title>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/birthday.js"></script>
<script>
	var pwdFlag = false;
	$(function() {

		$.ms_DatePicker({
			YearSelector : ".sel_year",
			MonthSelector : ".sel_month",
			DaySelector : ".sel_day"
		});

		// 检查两次密码是否一致
		$("#confirmPassword").blur(function() {
			var pwd1 = $("#password").val();
			var pwd2 = $("#confirmPassword").val();
			if (pwd1 != pwd2) {
				$("#passwordEnsure").text("两次密码不一致").css("color", 'red');
				pwdFlag = false;
			} else {
				$("#passwordEnsure").text("");
				pwdFlag = true;
			}

		});

	})
</script>
<link type="text/css" rel="stylesheet" href="styles/all.css" />
<script type="text/javascript">
	//左侧导航
	$(document).ready(function() {
		var menuList = $('.menuList');
		$('.nav input').each(function(i) {//获取列表的大标题并遍历
			$(this).click(function() {
				if ($(menuList[i]).css('display') == 'none') {
					$(menuList[i]).slideDown(200);
				} else {
					$(menuList[i]).slideUp(200);
				}
			});

		});
	});
	//全选
	function selectAdmins(inputObj) {
		var inputArray = document.getElementById("datalist")
				.getElementsByTagName("input");
		for (var i = 1; i < inputArray.length; i++) {
			if (inputArray[i].type == "checkbox") {
				inputArray[i].checked = inputObj.checked;
			}
		}
	}
	//删除
	function delAdmin() {
		var r = window.confirm("确定要删除此管理员吗？");
		document.getElementById("operate_result_info").style.display = "block";
	}
</script>
</head>
<body>
	<!-- logo区 -->
	<div class="logo">
		<img src="img/logo.png" height="90px"> <img src="img/vip.png"
			height="60px" width="50px" class="vip" align="right"> <img
			src="img/news.png" height="60px" width="45px" class="news"
			align="right"> <img src="img/firstpage.png" height="60px"
			width="50px" class="firstpage" align="right">
	</div>
	<!-- 小导航区 -->
	<div class="let_nav">
		<ul>
			<c:import url="../let_nav.jsp"></c:import>
		</ul>
	</div>
	<!-- 主要区域 -->
	<div id="main">
		<!-- 导航区 -->
		<div class="nav">
			<c:import url="../nav.jsp"></c:import>
		</div>
	</div>
	<!-- 数据区域 -->
	<div class="data">
		<form action="updateAdmin.do" method="post" class="main_form">
			<div class="text_info clearfix">
				<span>帐号：</span>
			</div>
			<div class="input_info">
				<input name="userCode" readonly type="text" class="width300"
					value="${admin.u_Code}" />
				<div class="validate_msg_short">账号不可更改</div>
			</div>
			<div class="text_info clearfix">
				<span>姓名：</span>
			</div>
			<div class="input_info">
				<input name="userName" type="text" class="width300"
					value="${admin.u_Name}" />
			</div>
			<div class="text_info clearfix">
				<span>密码：</span>
			</div>
			<div class="input_info">
				<input id="password" name="password" type="password"
					class="width300" value="" />
				<div class="validate_msg_short">6-20长度的字母、数字、汉字和下划线的组合</div>
			</div>
			<div class="text_info clearfix">
				<span>确认密码：</span>
			</div>
			<div class="input_info">
				<input id="confirmPassword" name="confirmPassword" type="password"
					class="width300" value="" />
				<div id="passwordEnsure" class="validate_msg_short"></div>
			</div>
			<div class="text_info clearfix">
				<span>性别：</span>
			</div>
			<div class="input_info fee_type">
				<input type="radio" name="radFeeType" value="男"
					<c:if test="${admin.u_Sex=='男'}">checked</c:if> id="male"
					onclick="feeTypeChange(1);" /> <label for="monthly">男</label> <input
					type="radio" name="radFeeType" value="女"
					<c:if test="${admin.u_Sex=='女'}">checked</c:if> id="female"
					onclick="feeTypeChange(2);" /> <label for="package">女</label>
			</div>

			<div class="text_info clearfix">
				<span>出生日期：</span>
			</div>
			<div class="input_info">
				<select name="birthYear" class="sel_year select_local" rel="2010">
				</select> 年 <select name="birthMonth" class="sel_month select_local" rel="1">
				</select> 月 <select name="birthDay" class="sel_day select_local" rel="1"></select>
				日
			</div>
			<div class="text_info clearfix">
				<span>所在地：</span>
			</div>
			<div class="admin_local">
				<select name="province" id="province" class="select_local">
					<option value="请选择">请选择</option>
				</select> <select name="city" id="city" class="select_local">
					<option value="请选择">请选择</option>
				</select> <select name="town" id="town" class="select_local">
					<option value="请选择">请选择</option>
				</select>
			</div>
			<div class="text_info clearfix">
				<span>证件类型：</span>
			</div>
			<div class="input_info">
				<select name="IDType">
					<option>身份证</option>
					<option>军人证</option>
					<option>护照</option>
				</select>
			</div>
			<div class="text_info clearfix">
				<span>证件号码：</span>
			</div>
			<div class="input_info">
				<input name="IDNumber" type="text" class="width300"
					value="${admin.u_IDNumber }" />
			</div>
			<div class="button_info clearfix">
				<input type="submit" value="保存" class="btn_save" onclick="pwdFlag">
				<input type="button" value="取消" class="btn_save"
					onclick="location.href = 'toBGIndex.do';">
			</div>
		</form>
	</div>
	<!-- 版权区 -->
	<div class="copy">
		<p>版权所有，违者必究</p>
	</div>
</body>
<script src="js/area.js"></script>
<script src="js/select.js"></script>
</html>